package com.yunxin.core.domain.service.order;

import com.yunxin.core.application.admin.team.DistributeDo;
import com.yunxin.core.application.command.order.OperateAllocationOrderRest;
import com.yunxin.core.domain.model.order.OrderUserApplyAllocation;

import java.util.List;

/**
 * @author zero°
 * @since 2023-06-07
 */
public interface OrderUserApplyAllocationService {

    /**
     * 操作分配订单账户
     * @param allocation allocation
     * @param accountId accountId
     * @param operator operator
     * @return count
     */
    int operateAllocationOrderAccount(OrderUserApplyAllocation allocation, Long accountId, String operator);

    /**
     * 查询当前商户信息
     * @param
     * @return
     */
    Long merchantIdByUserId(Long userId);

    /**
     * 保存任务i
     * @param distributeDo
     * @return
     */
    Integer saveTeamTask(DistributeDo distributeDo);

    /**
     * 根据订单id查询订单信息
     * @param orderIds
     * @return
     */
    List<OrderUserApplyAllocation> selectOrderDetail(List<Long> orderIds);

    /**
     * 校验订单是否被分配
     * @param orderIds
     * @return
     */
    List<Integer> selectalreadyDistribute(List<Long> orderIds);
}
